<div class="layui-form-item" style="border: 1px solid #C0C4CC; height: 30px; width: 90%;margin: 4px 0 4px 4px" id="frame">
        <div style="float: left">
            <label class="layui-form-label" >普通规则</label>
            <div class="layui-input-block" style="margin-top: 6px">
                  <select name="city" lay-verify="required" id='someRule'>
                        <option value="">--请选择--</option>
                        <option value="0" disabled="disabled">表单变量</option>
                        <option value="1">请假天数</option>
                        <option value="2">发起人ID</option>
                        <option value="3">表单主键</option>
                      <option value="4">流程运行ID</option>
                  </select>
            </div>
        </div>
    <!--<span style="border-right: 1px solid #555;position: absolute;top: -30px;right: -30px;height: 10px;"></span>-->
    <!--<span style="border-right: 1px solid #555;position: absolute;top: -10px;right: -10px;height: 10px;"></span>-->
    <!--<span style="border-top: 1px solid #555;position: absolute;top: -30px;right: -30px;width: 20px;"></span>-->
    <!--<span style="border-top: 1px solid #555;position: absolute;top: -10px;right: -10px;width: 20px;"></span>-->
    <!--<select style="position: absolute;top: -5px;right: -5px;">-->
        <!--<option value="1">且</option>-->
        <!--<option value="0">或</option>-->
    <!--</select>-->
        <div style="display: none" id="holiday">
            <div class="layui-input-block" style="margin-left: 4px; float: left">
                  <select name="city" lay-verify="required">
                        <option value="0" >等于</option>
                        <option value="1">不等于</option>
                        <option value="2">大于</option>
                        <option value="3">小于</option>
                        <option value="4">大于等于</option>
                        <option value="5">小于等于</option>
                  </select>
            </div>
            <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 120px;height: 20px;float: left">
            <div class="layui-input-block" style='margin-left: 4px; float: left'>
                  <select name="city" lay-verify="required" >
                        <option value="0" >等于</option>
                        <option value="1">不等于</option>
                        <option value="2">大于</option>
                        <option value="3">小于</option>
                        <option value="4">大于等于</option>
                        <option value="5">小于等于</option>
                  </select>
            </div>
            <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 120px;height: 20px;margin-top: 6px">
        </div>

    <div style="display: none;margin-top: 6px" id="startID">
        <div class="layui-input-block" style="margin-left: 4px; float: left">
            <select name="city" lay-verify="required">
                <option value="1" >包含</option>
                <option value="2">不包含</option>
            </select>
        </div>
        <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 120px;height: 20px;float: left">
        <a href="" class="layui-btn layui-btn-xs">选择</a>
    </div>

    <div style="display: none;margin-top: 6px" id="formID">
        <div class="layui-input-block" style="margin-left: 4px; float: left">
            <select name="city" lay-verify="required">
                <option value="1" >完全等于</option>
                <option value="2">不等于</option>
                <option value="3">等于（忽略大小写）</option>
                <option value="4">包含</option>
                <option value="5">不包含</option>
            </select>
        </div>
        <input type="text" name="title" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 120px;height: 20px;float: left">
    </div>
</div>

<script>
    layui.use(['layer', 'form', 'element'], function() {
        var layer = layui.layer
            , form = layui.form
            , element = layui.element;

        //规则选择切换
        $('#someRule').change(function () {
            if (this.value == 1 || this.value == 4) {
                $('#holiday').show();
                $('#startID').hide();
                $('#formID').hide();
            }else if (this.value == 2) {
                $('#startID').show();
                $('#holiday').hide();
                $('#formID').hide();
            }else if(this.value == 3) {
                $('#formID').show();
                $('#startID').hide();
                $('#holiday').hide();
            }else {
                $('#formID').hide();
                $('#startID').hide();
                $('#holiday').hide();
            }
        })

    })

</script>